<template>
	<view>
		<!-- #ifdef APP-PLUS || H5 -->
		<stutend-my v-if="type == 2" ref="stutend" :no-read-count="noReadCount"></stutend-my>
		<coach-my v-else ref="coach" :no-read-count="noReadCount"></coach-my>
		<!-- #endif -->
		<!-- #ifdef MP-WEIXIN -->
		<stutend-my ref="stutend" :no-read-count="noReadCount"></stutend-my>
		<!-- #endif -->
	</view>
</template>

<script setup>
import { getMessageNoReadCount } from '@/api/station-message'
// #ifdef APP-PLUS || H5
import CoachMy from './coach/my/index';
// #endif
import StutendMy from './student/mine/mine';
import { ref } from 'vue';
import { onShow } from '@dcloudio/uni-app';
const type = uni.getStorageSync('start-state');

const stutend = ref(''),
	coach = ref('');

const  noReadCount = ref(0)
onShow(() => {
	setTimeout(() => {
		// #ifdef APP-PLUS || H5
		if (type == 2) stutend.value.showFun();
		else coach.value.showFun();
		// #endif
		// #ifdef MP-WEIXIN
		stutend.value.showFun();
		// #endif
	});
	// getMessageNoReadCount().then(res => {
	// 	noReadCount.value = res
	// } )
});
</script>

<style lang="scss">
page {
	background: url($oss_pub_domain + '/sys/bg_1009.png') no-repeat;
	background-position: center top;
	box-sizing: border-box;
	padding: calc(var(--status-bar-height) + 14rpx) 32rpx 14rpx;
	min-height: 100%;
}
</style>
